package com.woniuxy.oldmanapi.service;

import com.woniuxy.oldmanapi.entity.Category;
import com.woniuxy.oldmanapi.entity.CategoryType;
import com.woniuxy.oldmanapi.mapper.CategoryTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryTypeService {
    @Autowired
    CategoryTypeMapper categoryTypeMapper;
    public List<CategoryType> selectById(int id) {

        List<CategoryType> consulterList = categoryTypeMapper.selectById(id);

        return consulterList;
    }

    public String selectByOcid(String category) {
        return categoryTypeMapper.selectByOcid(Integer.parseInt(category));
    }
}
